<template>
         <el-row :gutter="20">
          <el-col :span="16">
            <div class="block">
              <el-carousel height="180px">
                <el-carousel-item v-for="item in noticeDate">
                  <h3>{{ item.title }}</h3>
                </el-carousel-item>
              </el-carousel>
            </div>
          </el-col>
          <el-col :span="8">
            日历
          </el-col>
        </el-row>
</template>

<script setup>
import { ref, onMounted } from 'vue';
import { getList } from "@/api/notice.js"
const noticeDate = ref([]);

onMounted(() => {
  getList(1).then(res => {
    noticeDate.value = res.data
    console.log(noticeDate.value)
  })
});

</script>

<style scoped>
.block {
  border: 1px solid #ccc;
  /* 边框 */
  border-radius: 10px;
  /* 圆角 */
  box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.2);
  /* 3D阴影 */
  padding: 20px;
}
.demonstration {
    color: var(--el-text-color-secondary);
    margin: 0;
}



.el-carousel__item h3 {
    color: #475669;
    opacity: 0.75;
    line-height: 150px;
    margin: 0;
    text-align: center;
}

.el-carousel__item:nth-child(2n) {
    background-color: #99a9bf;
}

.el-carousel__item:nth-child(2n + 1) {
    background-color: #d3dce6;
}

.el-row {
    margin-bottom: 20px;
    border-radius: 4px;
}

.el-row:last-child {
    margin-bottom: 0;
}

</style>